.. _ocaaudiolevelsensor: 1.1.2.2.1 OcaAudioLevelSensor ============================== Class Hierarchy: :ref:`OcaRoot ` :raw:html:`→` :ref:`OcaWorker ` :raw:html:`→` :ref:`OcaSensor ` :raw:html:`→` :ref:`OcaLevelSensor ` :raw:html:`→` :ref:`OcaAudioLevelSensor ` .. cpp:class:: OcaAudioLevelSensor: OcaLevelSensor Child of **OcaLevelSensor** that returns an audio meter reading in dB relative to a known reference level, and whose value has been calculated by the selected averaging algorithm. **Properties**: .. _ocaaudiolevelsensor_classid: .. cpp:member:: static const OcaClassID ClassID = "1.1.2.2.1" Number that uniquely identifies the class. Note that this differs from the object number, which identifies the instantiated object. This property is an override of the **OcaRoot** property. This property has id ``5.1``. .. _ocaaudiolevelsensor_classversion: .. cpp:member:: static const OcaClassVersionNumber ClassVersion = 2 Identifies the interface version of the class. Any change to the class definition leads to a higher class version. This property is an override of the **OcaRoot** property. This property has id ``5.2``. .. _ocaaudiolevelsensor_law: .. cpp:member:: OcaLevelMeterLaw Law Enum that defines metering algorithm, including averaging characteristics and, in some cases, reference level. Readonly in some objects. This property has id ``5.1``. Properties inherited from :ref:`OcaLevelSensor `: - :cpp:texpr:`OcaDB` :ref:`OcaLevelSensor::Reading ` Properties inherited from :ref:`OcaSensor `: - :cpp:texpr:`OcaSensorReadingState` :ref:`OcaSensor::ReadingState ` Properties inherited from :ref:`OcaWorker `: - :cpp:texpr:`OcaBoolean` :ref:`OcaWorker::Enabled ` - :cpp:texpr:`OcaList` :ref:`OcaWorker::Ports ` - :cpp:texpr:`OcaString` :ref:`OcaWorker::Label ` - :cpp:texpr:`OcaONo` :ref:`OcaWorker::Owner ` - :cpp:texpr:`OcaTimeInterval` :ref:`OcaWorker::Latency ` Properties inherited from :ref:`OcaRoot `: - :cpp:texpr:`OcaONo` :ref:`OcaRoot::ObjectNumber ` - :cpp:texpr:`OcaBoolean` :ref:`OcaRoot::Lockable ` - :cpp:texpr:`OcaString` :ref:`OcaRoot::Role ` **Methods**: .. _ocaaudiolevelsensor_getlaw: .. cpp:function:: OcaStatus GetLaw(OcaLevelMeterLaw &law) Gets the value of the Law property. The return value indicates whether the property was successfully retrieved. This method has id ``5.1``. :param OcaLevelMeterLaw law: Output parameter. .. _ocaaudiolevelsensor_setlaw: .. cpp:function:: OcaStatus SetLaw(OcaLevelMeterLaw law) Sets the value of the Law property. The return value indicates whether the property was successfully set. Only implemented for objects whose Law property is read/write. This method has id ``5.2``. :param OcaLevelMeterLaw law: Input parameter. Methods inherited from :ref:`OcaLevelSensor `: - :ref:`OcaLevelSensor::GetReading(Reading, minReading, maxReading) ` Methods inherited from :ref:`OcaSensor `: - :ref:`OcaSensor::GetReadingState(state) ` Methods inherited from :ref:`OcaWorker `: - :ref:`OcaWorker::GetEnabled(enabled) ` - :ref:`OcaWorker::SetEnabled(enabled) ` - :ref:`OcaWorker::AddPort(Label, Mode, ID) ` - :ref:`OcaWorker::DeletePort(ID) ` - :ref:`OcaWorker::GetPorts(OcaPorts) ` - :ref:`OcaWorker::GetPortName(PortID, Name) ` - :ref:`OcaWorker::SetPortName(PortID, Name) ` - :ref:`OcaWorker::GetLabel(label) ` - :ref:`OcaWorker::SetLabel(label) ` - :ref:`OcaWorker::GetOwner(owner) ` - :ref:`OcaWorker::GetLatency(latency) ` - :ref:`OcaWorker::SetLatency(latency) ` - :ref:`OcaWorker::GetPath(NamePath, ONoPath) ` Methods inherited from :ref:`OcaRoot `: - :ref:`OcaRoot::GetClassIdentification(ClassIdentification) ` - :ref:`OcaRoot::GetLockable(lockable) ` - :ref:`OcaRoot::LockTotal() ` - :ref:`OcaRoot::Unlock() ` - :ref:`OcaRoot::GetRole(Role) ` - :ref:`OcaRoot::LockReadonly() `